<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>交易号管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/campusinfopay/campusinfoPay/">交易号列表</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="campusinfoPay" action="${ctx}/campusinfopay/campusinfoPay/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>订单号：</label>
				<form:input path="id" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>付款类型：</label>
				<form:select path="paytype" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('pay_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li>
				<label>订单状态</label>
				<form:select path="stat" class="input-medium required">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('order_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label>订单金额：</label>
				<form:input path="amount" htmlEscape="false" class="input-medium"/>
			</li>
			<li>
				<label>用户姓名</label>
				<form:select path="user.id" class="input-medium required">
					<form:option value="" label=""/>
					<form:options items="${campusinfoPays}" itemLabel="user.name" itemValue="user.id" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label>商品名称：</label>
				<form:input path="goodsName" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>订单号</th>
				<th>付款类型</th>
				<th>订单状态</th>
				<th>订单金额</th>
				<th>用户姓名</th>
				<th>商品名称</th>
				<shiro:hasPermission name="campusinfopay:campusinfoPay:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="campusinfoPay">
			<tr>
				<td>
					${campusinfoPay.id}
				</td>
				<td>
					${fns:getDictLabel(campusinfoPay.paytype, 'pay_type', campusinfoPay.id)}
				</td>
				<td>
						${fns:getDictLabel(campusinfoPay.stat, 'order_type', campusinfoPay.id)}
				</td>
				<td>
					${campusinfoPay.amount}
				</td>
				<td>
					${campusinfoPay.user.name}
				</td>
				<td>
					${campusinfoPay.goodsName}
				</td>
				<shiro:hasPermission name="campusinfopay:campusinfoPay:edit"><td>
					<a href="${ctx}/campusinfopay/campusinfoPay/delete?id=${campusinfoPay.id}" onclick="return confirmx('确认要删除该交易号吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>